/*******************************************************************************
* Copyright (c) 2010, 2018 西安秦晔信息科技有限公司
* Licensed under the Apache License, Version 2.0 (the "License");
*    you may not use this file except in compliance with the License.
*    You may obtain a copy of the License at
*
*       http://www.apache.org/licenses/LICENSE-2.0
*
*    Unless required by applicable law or agreed to in writing, software
*    distributed under the License is distributed on an "AS IS" BASIS,
*    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*    See the License for the specific language governing permissions and
*    limitations under the License.
*******************************************************************************/
package com.qinyeit.serviceapp.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.qinyeit.serviceapp.entity.enums.SettlementType;
import lombok.Builder;
import lombok.experimental.Tolerate;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.*;
import java.util.Date;

/**
 * ClassName: BranchSupplier <br/>
 * Function: 门店供应商 <br/>
 * date: 2018-11-29 16:05:34 <br/>
 *
 * @author liuwenjin
 * @version  1.0
 * @since JDK 1.8
 */
@Builder
@Entity
@Table(name="branch_suppliers")
public class BranchSupplier extends MerchantGroupBaseEntity<Long> {

	private static final long serialVersionUID = 1L;

	// 编号 
    @Column(name="no", length = 300)
	private String no = null;

	// 名称
    @Column(name="name", length = 300)
	private String name = null;

	// 联系电话 
    @Column(name="phone", length = 300)
	private String phone = null;

	// 结算方式
	@Column(name="sell_type", length = 300)
	@Enumerated(EnumType.STRING)
	private SettlementType sellType = SettlementType.MONTH;

	// 联系地址 
    @Column(name="address", length = 300)
	private String address = null;

	// 联系人 
    @Column(name="linker", length = 300)
	private String linker = null;

	// 操作人名称 
    @Column(name="operator_name", length = 300)
	private String operatorName = null;

	// 操作时间 
	@JSONField(format="yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
    @Column(name="operate_time")
	private Date operateTime = null;

	//创建的时候生成 编辑的时候不变
	@Column(name="uuid", length = 300)
	private String uuid = "";

	//更新的时间戳 long
	@Column(name="update_timestamp")
	private Long updateTimestamp = null;


	//开户银行
	@Column(name = "bank_name")
	private String bankName = "";
	//银行账号
	@Column(name = "bank_no")
	private String bankNo = "";
	//社会信用代码
	@Column(name = "credit_no")
	private String creditNo = "";

    @Tolerate
	public BranchSupplier() {
		
	}
    @Tolerate
	public BranchSupplier(Long id){
    	super.setId(id);
    }
	
	/**
	 * 获取编号
	 */
	public String getNo() {
		return this.no;
	}

    /**
     * 设置编号
     */
	public BranchSupplier setNo(String no) {
		this.no = no;
		return this;
	}

	/**
	 * 获取仓库名称
	 */
	public String getName() {
		return this.name;
	}

    /**
     * 设置仓库名称
     */
	public BranchSupplier setName(String name) {
		this.name = name;
		return this;
	}

	/**
	 * 获取联系电话
	 */
	public String getPhone() {
		return this.phone;
	}

    /**
     * 设置联系电话
     */
	public BranchSupplier setPhone(String phone) {
		this.phone = phone;
		return this;
	}

	public SettlementType getSellType() {
		return sellType;
	}

	public void setSellType(SettlementType sellType) {
		this.sellType = sellType;
	}

	/**
	 * 获取联系地址
	 */
	public String getAddress() {
		return this.address;
	}

    /**
     * 设置联系地址
     */
	public BranchSupplier setAddress(String address) {
		this.address = address;
		return this;
	}

	/**
	 * 获取联系人
	 */
	public String getLinker() {
		return this.linker;
	}

    /**
     * 设置联系人
     */
	public BranchSupplier setLinker(String linker) {
		this.linker = linker;
		return this;
	}

	/**
	 * 获取操作人名称
	 */
	public String getOperatorName() {
		return this.operatorName;
	}

    /**
     * 设置操作人名称
     */
	public BranchSupplier setOperatorName(String operatorName) {
		this.operatorName = operatorName;
		return this;
	}

	/**
	 * 获取操作时间
	 */
	public Date getOperateTime() {
		return this.operateTime;
	}

    /**
     * 设置操作时间
     */
	public BranchSupplier setOperateTime(Date operateTime) {
		this.operateTime = operateTime;
		return this;
	}

	public String getUuid() {
		return uuid;
	}

	public void setUuid(String uuid) {
		this.uuid = uuid;
	}

	public Long getUpdateTimestamp() {
		return updateTimestamp;
	}

	public void setUpdateTimestamp(Long updateTimestamp) {
		this.updateTimestamp = updateTimestamp;
	}

	public String getBankName() {
		return bankName;
	}

	public void setBankName(String bankName) {
		this.bankName = bankName;
	}

	public String getBankNo() {
		return bankNo;
	}

	public void setBankNo(String bankNo) {
		this.bankNo = bankNo;
	}

	public String getCreditNo() {
		return creditNo;
	}

	public void setCreditNo(String creditNo) {
		this.creditNo = creditNo;
	}
}
